{include file="public/header"}
<script type="text/javascript" charset="utf-8" async src="__TEMPLATE__/index/js/register.js"></script>
<script type="text/javascript">
function xianshi_and_yincang(tids){
	document.getElementById(tids).style.display="block";
}
function xianshi_and_yincang_s(tids){
	document.getElementById(tids).style.display="none";
}
function refreshVerifyReg() {
    var ts = Date.parse(new Date()) / 1000;
    $('#verify_img_reg').attr("src", "{:url('Index/verify')}?id="+ts);
}
</script>

<main class="outline" id="container">
  <div class="main register">
    <div class="register_forms">
      <h1>会员注册</h1>
      <div class="form">
        <form method="post" action="{:url('User/register')}" enctype="application/x-www-form-urlencoded" id="register_form">
          <div class="form_group">
            <div class="column">
              <label for="" class="three">
                <span class="form_required">*</span>用户名</label>
              <input type="text" placeholder="请输入用户名" name="reg_user" id="reg_username" value="" maxlength="16">
              <img class="success_icon" id="reg_username_icon" src="__TEMPLATE__/index/img/mm_26.png" style="display:none">
              </div>
            <div id="username_tip" class="column column_tip" style="display:block">
              <span id="username_error_tip" class="error_tip">用户名格式为：不能含有中文,且长度为6-16个字母或数字</span></div>
          </div>
          <div class="form_group">
            <div class="column">
              <label for="">
                <span class="form_required">*</span>登录密码</label>
              <input type="password" placeholder="请输入登录密码" name="reg_pass" id="password_input" maxlength="12">
              <img class="success_icon" id="password_input_icon" src="__TEMPLATE__/index/img/mm_26.png" style="display:none">
              </div>
            <div id="password_tip" class="column column_tip" style="display:block">
              <span class="error_tip">密码格式为：以字母开头,长度在6-12之间,只能包含数字字母下划线</span></div>
          </div>
          <div class="form_group">
            <div class="column">
              <label for="">
                <span class="form_required">*</span>确认密码</label>
              <input type="password" placeholder="请再次输入密码" name="reg_pass_con" id="repassword" maxlength="12">
              <img class="success_icon" id="repassword_icon" src="__TEMPLATE__/index/img/mm_26.png" style="display:none"></div>
          </div>
          <div class="form_group">
            <div class="column">
              <label for="" class="three"><span class="form_required">*</span>手机号</label>
              <input type="text" placeholder=" 请输入手机号" name="reg_phone" id="reg_phone">
              <img class="success_icon" id="reg_phone_icon" src="__TEMPLATE__/index/img/mm_26.png" style="display:none"></div>
              
          </div>
		{if condition="$code_open eq 1"}
          <div class="form_group">
     
        <div class="column">
          <input id="code_open" type="hidden" value="{$code_open}">
            <label for="" class="three"><span class="form_required">*</span>验证码</label>
            <input placeholder="请输入验证码" type="text" class="code-input" name="code" id="code">
            <img id="verify_img_reg" class="code-img" alt="captcha" src="{:url('Index/verify')}" onclick="refreshVerifyReg()" />
            <img class="success_icon" id="code_icon" src="__TEMPLATE__/index/img/mm_26.png" style="display:none"></div>
          </div>
   {/if}

            <div class="form_group" style="display:block;">
              <div class="column">
                <label for="" class="three">{if condition="$tjm_open eq 1"} <span class="form_required">*</span>{/if}推荐码</label>
                <input type="text" placeholder=" 请输入推荐码" name="reg_recommend" value="{$tjm}"></div>
            </div>
          <div class="select-tos">
            <input type="checkbox" id="deal" checked/>我已经满合法博彩年龄，且同意各项开户条约， 
            <a href="#" height="653" border="0" width="1000" onclick="window.open(&quot;{:url('Index/regAgreement')}&quot;,&quot;_reg_xieyi&quot;,&quot;width=1040,height=653&quot;).focus()"> “开户协议” </a>
     </div>
  
		  <input type="button" class="btn btn-radius btn-default btn-register" value="立即注册" style="width:240px; margin-left:180px" id="register_submit" />
		  </form>
      </div>
    </div>
    <div class="jquery-modal blocker current" style="display:none">
      <div id="model_2" class="model_2 modal" style="display:none">
        <div class="model_header">
          <h1>温馨提醒</h1></div>
        <div class="model_body">
          <span id="model_content"></span>
        </div>
        <div class="foot_succ">
          <a class="btn btn-default btn-radius close">确定</a></div>
        <a rel="modal:close" class="close-modal close">Close</a></div>
    </div>
  </div>
</main>
<script>
	$('#register_submit').click(function(){
		if($(this).val()=='注册中') return;
	    $(this).val('注册中')
	    $('#register_form').submit()
	    setTimeout(function(){
	    	$('#register_submit').val('注册')
	    },2000)
    })
</script>


{include file="public/footer"}
